﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ALinq.BBS.DataAccess
{
    public class ReplyList : IEnumerable<Reply>
    {
        private readonly IEnumerable<Reply> items;

        public ReplyList(Post post, IEnumerable<Reply> replies, int pageIndex = 0)
        {
            this.Post = post;
            this.items = replies;
            this.Index = pageIndex;
        }

        public IEnumerator<Reply> GetEnumerator()
        {
            return this.items.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public Post Post { get; internal set; }

        public int Index { get; private set; }
    }
}
